package ihm.models.events;

import java.util.EventObject;

/**
 * This event is use to notify that the language used in the program changed.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public class LanguageChangedEvent
extends EventObject {
  /**
   * Serial Version Value.
   */
  private static final long serialVersionUID = 1L;
  /**
   * The new language name which will be used in this program.
   */
  private String newLanguage;
  
  /**
   * Create an event used to notify that the language which will be used in 
   * this program has been changed and the name of the new language is given 
   * in parameter.
   * @param source - The source of this event.
   * @param newLanguage - The new language name.
   */
  public LanguageChangedEvent(Object source, String newLanguage)
  {
    super(source);
    this.newLanguage = newLanguage;
  }
  /**
   * Getter returning the name of the new language selected for the program.
   * @return String - The new language selected for the program.
   */
  public String getNewLanguage()
  {
    return this.newLanguage;
  }
}
